<?

class Edit extends Button {

    function render($sel) {
        $EDITABLE_EXTENSIONS = Config::getValue('limits','EDITABLE_EXTENSIONS');
        if ($sel->isFileSelected()) {
            $file = $sel->getSelected();
            if (in_array($file->getExt(),$EDITABLE_EXTENSIONS)) {
                return $this->renderPopupButton('edit',"'dialogs/edit.php?path={$_GET['path']}&object={$_GET['object']}','editWind','status=no,menubar=no,height=500,width=700'",'Edit','Edit in plain-text mode');
            }
        }
        return $this->renderDisabledButton('edit','Edit','Edit in plain-text mode');
    }

}

?>